﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectronicAuditForm.aspx.cs" Inherits="Docsbox.Layouts.Docsbox.ElectronicAuditForm" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
.fieldTitle
{
    font-size:11px;
    line-height:20px;
    padding-right: 10px;
    white-space: nowrap;
    text-align: right;
}
.fieldValue
{
    font-size: 11px;
    font-weight:bold;
    line-height: 20px;
}
.fieldComment {
    font-size: 10px;
    line-height: 15px;
    height: 40px;
    padding: 5px;
}
.checkTitle
{
    font-size: 11px;
    border-top: 1px solid #CCCCCC;
    padding: 5px 10px 5px 0px;
}
.checkCheckBox
{
    font-size: 11px;
    padding: 5px 5px 5px 0px;
}
.checkComments
{
    font-size: 11px;
}

</style>
<script type="text/javascript" src="/_layouts/VehicleFinance/jquery-latest.js"></script>

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">

<div style="width:100%; height: 80px; padding: 0 0 10px 0; border-bottom: 1px solid #CCCCCC;">
<table>
    <tr>
        <td class="fieldTitle">MTF No:</td><td class="fieldValue"><asp:Label ID="lblTitle" runat="server" /></td>
        <td class="fieldTitle">First Name:</td><td class="fieldValue"><asp:Label ID="lblFirstName" runat="server" /></td>
        <td class="fieldTitle">Surname:</td><td class="fieldValue"><asp:Label ID="lblSurname" runat="server" /></td>
        <td class="fieldTitle">Reg No:</td><td class="fieldValue"><asp:Label ID="lblRegNo" runat="server" /></td>
        <td class="fieldTitle">Status:</td><td class="fieldValue"><asp:Label ID="lblStatus" runat="server" /></td>
    </tr>
    <tr>
        <td class="fieldTitle">Contract Date:</td><td class="fieldValue"><asp:Label ID="lblContractDate" runat="server" /></td>
        <td class="fieldTitle">Revision Date:</td><td class="fieldValue"><asp:Label ID="lblRevisionDate" runat="server" /></td>
        <td class="fieldTitle">Comments:</td><td class="fieldComment" colspan="5"><asp:Label ID="lblComments" runat="server" /></td>
    </tr>
</table>
</div>

<div style="width:100%; margin-top: 10px;">
    <div style="width:30%; float:left; ">
        <div style="width:100%; height: 75%; max-height: 360px; min-height: 320px; float:left; overflow: scroll">
            <input type="checkbox" runat="server" id="chbCheckAll" /> Click to Check All
            <table style="width: 100%; ">
                <tr><td class="checkTitle" colspan="2">Drivers Lic (Copy, Valid, Status)</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="DriverLicenseCheckBox"  runat="server" /></td><td class="checkComments"><asp:TextBox ID="txtDriverLicenseComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>

                
                <tr><td class="checkTitle" colspan="2">Bank Statement</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="BankStatementCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="txtBankStatementComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
                
                <tr><td class="checkTitle" colspan="2">Confirmation of Address</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="AddressConfirmationCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="txtConfirmationOfAddressComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Wages Slip (Current, Amount)</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="WagesSlipCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="WagesSlipComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Visa/Residency</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="VisaResidencyCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="VisaResidencyComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Credit Check (acceptable)</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="CreditCheckCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="CreditCheckComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Insurance (MTF Noted)</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="InsuranceCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="InsuranceComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">RPW (Risk Protectioni Wavier)</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="RPWCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="RPWComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">CDP Cover</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="CDPCoverCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="CDPCoverComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Affordability</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="AffordabilityCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="AffordabilityComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
                <tr><td class="checkTitle" colspan="2">Deposit Requirement</td></tr>
                <tr><td class="checkCheckBox"><asp:CheckBox ID="DepositRequirementCheckBox" runat="server" /></td><td class="checkComments"><asp:TextBox ID="DepositRequirementComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
            
            </table>
        </div>
        <div style="width:100%; height: 25%; min-height: 200px; max-height:240px; float:left; overflow:auto;">
            <asp:TreeView ID="projectDocTreeView" runat="server" OnSelectedNodeChanged="pdTreeView_SelectedNodeChanged">
            </asp:TreeView>
        </div>
    </div>
    <div style="width:68%; height:100%; float:right;">
        <div style="width:100%;height:80%; float:left;">
            <asp:Literal ID="embedPDFViewer" runat="server" />
        </div>
        <div style="width:100%;height:20%; float:left;">
            <table>
                <tr><td>
                        <table>
                            <tr><td>General Comments:</td></tr>
                            <tr><td><asp:TextBox ID="txtAuditComment" runat="server" TextMode="MultiLine" Rows="3" /></td></tr>
                        </table>
                    </td>
                    <td style="width: 120px;">
                        <span style="line-height: 40px;"><asp:Button ID="btnCancel" Width="100px" runat="server" Text="Cancel" OnClientClick="javascript:window.frameElement.commitPopup();" /></span>
                        <span style="line-height: 40px;">
                            <asp:Button ID="btnSave" runat="server" Text="Save Changes" Width="100px" OnClick="btnSave_Click" />
                        </span>
                    </td>
                    <td style="width:180px;">
                        <span style="line-height: 40px;">
                            <asp:Button ID="btnAmendmentsRequired" Width="160px" runat="server" Text="Amendments Required" OnClick="btnAmendmentsRequired_Click" />
                        </span>
                        <span style="line-height: 40px;">
                            <asp:Button ID="btnComplete" runat="server" Width="160px" Text="Audit Complete" OnClientClick="if(!ValidateCheckboxes()) return false;" OnClick="btnComplete_Click" />
                        </span>
                    </td>
                </tr>
            </table>
        </div>

    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("[id$='chbCheckAll']").click(function (event) {
            var option = this.checked;
            $(":checkbox[id$='CheckBox']").each(function () {
                this.checked = option;
            });
        });
    });
    
    function ValidateCheckboxes() {
        $(":checkbox[id$='CheckBox']").each(function () {
            var option = this.checked;
            if (!option) {
                alert("All check items must be checked before the account can be completed.");
                return false;
            }
        });
        return true;
    }
</script>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Application Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>
